package aexp.customadapter;

import java.util.ArrayList;

import android.app.ListActivity;
import android.os.Bundle;

public class CustomAdapterActivity extends ListActivity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ArrayList<Weather> weatherList = new ArrayList<Weather>();
        Weather w = new Weather( "London", 17, Weather.OVERCAST );
        weatherList.add( w );
        w = new Weather( "Paris", 22, Weather.OVERCAST );
        weatherList.add( w );
        w = new Weather( "Athens", 29, Weather.SUNNY );
        weatherList.add( w );
        w = new Weather( "Stockholm", 12, Weather.RAIN );
        weatherList.add( w );
        WeatherAdapter weatherAdapter = new WeatherAdapter( 
				this,
				weatherList ); 
        setListAdapter( weatherAdapter );
    }
}
